<?php
namespace common\models;

use Yii;

/**
 * This is the model class for table "guard_partner".
 *
 * @property int $id
 * @property string $title
 * @property string $client_id 业务方id
 * @property string $app_id 三方id
 * @property string $app_secret 三方秘钥
 * @property int $status 可用状态
 * @property string $create_time 创建时间
 * @property string $update_time 更新时间
 */
class GuardPartner extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'guard_partner';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['title', 'client_id', 'app_id', 'app_secret'], 'required'],
            [['status'], 'integer'],
            [['create_time', 'update_time'], 'safe'],
            [['title'], 'string', 'max' => 30],
            [['client_id'], 'string', 'max' => 32],
            [['app_id', 'app_secret'], 'string', 'max' => 60],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'title' => 'Title',
            'client_id' => 'Client ID',
            'app_id' => 'App ID',
            'app_secret' => 'App Secret',
            'status' => 'Status',
            'create_time' => 'Create Time',
            'update_time' => 'Update Time',
        ];
    }
}